<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<{lang_script src="lang.js" app='site'}>
<{script src="moo.min.js" app="b2c" pdir="js_mini"}>
<{script src="shop.min.js" app="b2c" pdir="js_mini"}>
<{script src="ui.min.js" app="site" pdir="js_mini"}>
<{css src="basic.min.css" app="b2c" pdir="css_mini"}>

<title><{t}>在途数<{/t}></title>

</head>
<style type="text/css">
    body{
        background:#f9f9f9;
    }
    .hr_head{
        border: 1px solid #efefef;
    }
    .container{
        margin-top: 20px;
        width: 80%;
        min-width: 800px;
        margin-left: auto;
        margin-right: auto;
        background: #fff;
        min-height: 400px;
        overflow: visible;
        padding: 10px 20px 20px 20px;
    }
    .container table{
        width: 100%;
        font: 16px/1.5 Tahoma, Helvetica, Arial, STXihei, SimSun, sans-serif;
        color: #444;
        border-collapse: collapse;
    }
    .container table th{
        border: 1px solid #dedede;
        height: 32px;
        text-align:left;
        padding: 5px 10px 4px 10px;
        border-bottom: 2px solid #dedede;
    }
    .container table td{
        text-align:left;
        border: 1px solid #dedede;
        padding: 5px 10px 4px 10px;
    }
</style>
<body>
<div class="container" id="product_container">
    <h3><{t}>在途数——即将到货，敬请关注<{/t}></h3>
    <div style="float:right;margin-bottom:10px;"><button type="button" class="btn btn-major action-supplement"><span style="font-size:20px;padding-right:18px;"><{t}>补货通知<{/t}></span></button>
    </div>
    <div id="product_supplement" class="product-notify" style="display:none;">
  <p class="desc"><{t}>该货品在途中，请在下面输入您的邮箱地址或手机号码，当我们有现货供应时，我们会通知您！<{/t}></p>
  <form class="form" method="post" action="<{link app=b2c ctl=site_product act=toNotify}>">
    <input type="hidden" name="item[0][goods_id]" value="<{$goods_id}>">
    <input type="hidden" name="item[0][product_id]" value="<{$product_id}>">
    <input type="hidden" name="supplement" value="1">
    <ul>
      <li class="form-item">
        <label for="" class="form-label"><{t}>邮箱地址<{/t}>：</label>
        <span class="form-act">
          <{input type="text" name="email" id="" size="30" vtype="email"}>
        </span>
      </li>
      <li class="form-item">
        <label for="" class="form-label"><{t}>手机号码<{/t}>：</label>
        <span class="form-act">
          <{input type="text" name="cellphone" id="" size="30" vtype="required"}>
        </span>
      </li>
      <li class="form-item form-item-last">
        <label for="" class="form-label"></label>
        <span class="form-act">
          <{button type="submit" class="btn-caution" label=$___b2c="提交"|t:'b2c' rel="_request"}>
        </span>
      </li>
    </ul>
  </form>
</div>
      <table  width="100%" cellpadding="0">
          <thead>
            <tr>
                <th><{t}>花型编号<{/t}></th>
                <th><{t}>产品名称<{/t}></th>
                <th><{t}>成分<{/t}></th>
                <th><{t}>纱支<{/t}></th>
                <th><{t}>经纬密<{/t}></th>
                <th><{t}>门幅<{/t}></th>
                <th><{t}>在途数<{/t}></th>
                <th><{t}>单位<{/t}></th>
                <th><{t}>备注<{/t}></th>
                <th><{t}>预计到货时间<{/t}></th>
            </tr>
        </thead>
        <tbody>
        <{foreach from=$row key=key item=item}>
            <tr>
                <td><{t}><{$item.proCode|default:'&nbsp;'}><{/t}></td>
                <td><{t}><{$item.proName|default:'&nbsp;'}><{/t}></td>
                <td><{t}><{$item.chengfen|default:'&nbsp;'}><{/t}></td>
                <td><{t}><{$item.shazhi|default:'&nbsp;'}><{/t}></td>
                <td><{t}><{$item.jingmi}>*<{$item.weimi}><{/t}></td>
                <td><{t}><{$item.menfu|default:'&nbsp;'}><{/t}></td>
                <td><{t}><{$item.cnt|default:'&nbsp;'}><{/t}></td>
                <td><{t}><{$item.unit|default:'&nbsp;'}><{/t}></td>
                <td width="200px"><{t}><{$item.memo2}><{/t}></td>
                <td><{t}><{$item.jiaoqi|default:'&nbsp;'}><{/t}></td>
            </tr>
        <{/foreach}>
        </tbody>
    </table>
</div>
</body>
</html>
<script>
var container = $('product_container');

container.addEvents({
    'click:relay(.action-supplement)': function(e) {
        var dialog = new Dialog($('product_supplement').wrapped(), {
            title:'补货通知',
            width: 400,
            modal: {
                'class': 'cover'
            },
            onLoad: function(){
                var content = this.content;
                content.getElement('[rel=_request]').store('_ajax_config',{onSuccess:function(rs){
                    if(rs && rs[0]) {
                        if(rs[0]['true']) {
                            content.getElement('.product-notify').innerHTML = '<div class="success"><i class="icon">&#x25;</i>联系方式已经成功提交，到货后会立刻通知您。</div>';
                            dialog.hide.delay(3000, dialog);
                        }
                    }
                }});
            }
        });
    },
});
</script>
